package Swing;
//密码框
import javax.swing.*;
import java.awt.*;

public class Test_JPassworldField extends JFrame {
    public Test_JPassworldField() {
        Container contentPane = this.getContentPane();

        JPasswordField jPasswordField = new JPasswordField();
        jPasswordField.setEchoChar('*');

        contentPane.add(jPasswordField);
        this.setVisible(true);
        this.setSize(500,500);
        this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    }
    public static void main(String[] args) {
        new Test_JPassworldField();
    }
}
